<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head th:include="base/page/header :: headerTiFragment" />

<body>
	<div th:include="base/page/menu-user :: menuTiFragment"></div>
	<div class="container">
		<form id="form" th:object="${user}" role="form" class="form-horizontal">
			<fieldset>
				<legend class="text-info">Detail User</legend>
				<div class="form-group error">
					<div class="col-lg-3">
						<span th:text="${changedPassword} ? 'Your password has been changed'" class="text-danger"></span>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">Username</label>
					<div class="col-lg-3">
						<span th:text="*{username}" class="form-control"></span>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">Name</label>
					<div class="col-lg-3">
						<span th:text="*{name}" class="form-control"></span>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">Full Name</label>
					<div class="col-lg-3">
						<span th:text="*{fullName}" class="form-control"></span>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">Phone Number</label>
					<div class="col-lg-3">
						<span th:text="*{phoneNumber}" class="form-control"></span>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">Email</label>
					<div class="col-lg-3">
						<span th:text="*{email}" class="form-control"></span>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">Position</label>
					<div class="col-lg-3">
						<span th:text="*{position} == 'developer' ? 'Developer' : 'Project Manager'" class="form-control"></span>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">Status</label>
					<div class="col-lg-3">
						<span th:text="*{enabled} ? 'Active': 'Not Active'" class="form-control"></span>
					</div>
				</div>
				<div class="form-group error"></div>
				<div class="form-group error"></div>
				<div class="form-group error">
					<div class="col-lg-3">						
						<a th:href="@{'/base/page/user/edit/' + ${user.uuid}}"><button class="btn btn-primary" type="button">Edit</button></a>&nbsp;&nbsp;&nbsp;&nbsp;
						<a th:href="@{'/base/page/user/changepassword/' + ${user.uuid}}"><button class="btn btn-default" type="button">Change Password</button></a>
					</div>
				</div>				
			</fieldset>
		</form>
	</div>
</body>

</html>